import http from '@/utils/request'


//获取列表
function getTableDataList() {
    return http.get('/course-api/getZsgcMsg')
}


//添加
function addTableDataList(row) {
    let urlParams = new URLSearchParams()
    urlParams.append('row', row)
    return http.post('/course-api/add',urlParams)
}

//查询
function searchTableDataList(likeWord) {
    let urlParams = new URLSearchParams()
    urlParams.append('likeWord', likeWord)
    return http.post('/course-api/search', urlParams)
}

//删除
function deleteTableDataList(id) {
    return http.delete(`/course-api/delete/${id}`)
}

//修改
function updateTableDataList(row) {
    let urlParams = new URLSearchParams()
    urlParams.append('row', row)
    return http.put('/course-api/update', urlParams)
}

// 转换pdf 
function pdfConvert() {
    return http.post('/course-api/export/pdf')
}

//导出
export {
    getTableDataList,
    addTableDataList,
    searchTableDataList,
    deleteTableDataList, 
    updateTableDataList,
    pdfConvert
}